beyondbinaryfandomcom-20200215-history
Python
"Python is a popular interpreted language with object-oriented features. Learning Python ;Getting started with Python *Official Python tutorial *Beginner's Guide to coding in python *[http://diveintopython.net/toc/index.html Dive Into Python] *Non-Programmer's Tutorial for Python 2.6 on Wikibooks ;Libraries * (Free interactive Python tutorial) *Pywikibot–The most used Python bot framework. *wikitools—A lightweight bot framework that uses the MediaWiki API exclusively for getting data and editing, used and maintained by Mr.Z-man (downloads) *mwclient—An API-based framework maintained by Bryan *mwparserfromhell - A Python parser for MediaWiki text, maintained by The Earwig" Coding Games and Challenges (fun and accessible for teenagers with no coding background, free for first 100 levels or so) Online Courses :|u://grumbe97asd>: "Coursera :*Majority of classes are paid, but they are monthly so if you complete them in a month you only pay a month :*A lot of content :*I think this is the best option once you do some beginner courses :EDX :*free :*low amount of content once you go above beginner :*I would start with this one with, since they have cs50, mit etc. :Udacity :*usually very expensive nanodegree programs, but you get mentorships, project reviews, project assignments :*only worth paying if you think above points are worth around 200$ a month :*single courses are free, but they often have no projects, i don't think they are that good, very barebones (exception being android course, which I know) :Udemy :*very beginner, no projects, handheld :*would rate lowest of them :*would use if having trouble with a concept and tried other sources, but still struggle :I would do edx for beginner and then coursera. :Also check stanford courses which are online and free. They have databases, algorithms etc." :|u://kmetek>: "If you want very good Python course, this is the one: https://www.udemy.com/python-3-deep-dive-part-1/ :Freed Baptiste rules." :"Coursera Python for Everybody Specialization VS EDX Introduction to Computer Science and Programming Using Python" :|u://Protoss_Pylonyou>: I say, watch sentdex on youtube for free and read the docs (also free)." :|u://my_password_is______>: "I think the best coursera courses cost money -- $49 a month -- but they do have some free ones :but edx is free :and udacity is free :udemy is very inexpensive - but most of their courses are not as good as the others :try :https://www.edx.org/course/cs50s-introduction-computer-science-harvardx-cs50x :https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11 :https://www.edx.org/course/introduction-computational-thinking-data-mitx-6-00-2x-6 :https://www.udacity.com/course/intro-to-computer-science--cs101 :https://www.udacity.com/course/introduction-to-operating-systems--ud923 :https://www.udacity.com/course/intro-to-algorithms--cs215" :|u://chiron90>: "I have been taking various classes on all three platforms. They are more or less the same and it just depends on what you are exactly looking for. If you just want to learn and gain expertise in Data Science, just take any course. If you want to actually get a certification that shows you have completed the classes, you could pay for it. Personally, I think they are bit over priced but you are getting an education from a top university for fraction of a cost and they need paid subscription to keep the sites running." :|u://deleted>"I personally recommend: :EdX > Coursera > Udacity :Udacity is really good at starting you off with some ideas but it really lacks the depth. :Coursera is quite good, however I feel like some of their courses vary in quality. :I've been doing the EdX Spark course and it is fantastic - very nice balance between lectures and interesting labs." :"Berkeley CS 61B Data Structures, with Josh Hug. :One of the best teachers I've seen, esp for Data Structures. Super intelligent, and has an interesting personality too. Makes coding look easy. Watched his classes before I took Data Structures and it made my semester so easy. Completely free too:" Early Mistakes python Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined :"It looks like you are trying to start the Python interpreter by running the command python. However the interpreter is already started. It is interpreting python as a name of a variable, and that name is not defined. Try this instead and you should hopefully see that your Python installation is working as expected: print("Hello world!")" C:\Users\%username%\AppData\Local\Programs\Python\Python37\Scripts\ :"I'm trying to use pip to install a package. I try to run pip install from the Python shell, but I get a SyntaxError. Why do I get this error? How do I use pip to install the package?" :"Use the command line, not the Python shell (DOS, PowerShell in Windows)." C:\Program Files\Python2.7\Scripts> pip install XYZ (csv file using DictWriter) ^ TabError: inconsistent use of tabs and spaces in indentation :"You cannot mix tabs and spaces, according the PEP8 styleguide: Spaces are the preferred indentation method. Tabs should be used solely to remain consistent with code that is already indented with tabs. Python 3 disallows mixing the use of tabs and spaces for indentation." Applications IDEs and Code Editors :"A code editor is a tool that is used to write and edit code. They are usually lightweight and can be great for learning. However, once your program gets larger, you need to test and debug your code, that's where IDEs come in. :An IDE (Integrated Development Environment) understand your code much better than a text editor. It usually provides features such as build automation, code linting, testing and debugging. This can significantly speed up your work. The downside is that IDEs can be complicated to use." :1. IDLE :2. Sublime Text 3 :3. Atom :4. Thonny :5. PyCharm Wiki Bots Openpyxl (Excel Automation) pip install openpyxl Operating System Automation *Chapter 16 Automating common tasks on your computer :16.1 File names and paths :16.2 Example: Cleaning up a photo directory Changing Directory from sh import cd, ls cd('/tmp') print ls() import subprocess # we are in ~/Library subprocess.call("ls") import subprocess # just to call an arbitrary command e.g. 'ls' # enter the directory like this: with cd("~/~/~/~/Users"): # we are in C:/Users if we start in C:\\Python\\Python37\\lib\\ntpath.py' - one '~' for each sub-level below C:/ subprocess.call("ls") # outside the context manager we are back wherever we started. -######## |U://Josiah>: # This is the easiest way in an interactive shell, I think. # Note that in Windows, you have to use forward slashes, like os.chdir("C:/path/to/location") import os os.chdir("C:/Users/solfr/") :If You would like to perform something like "cd.." option, just type: os.chdir("..") PyEphem AstroBlurb Playground https://www.katacoda.com/courses/python/playground https://nostarch.com/pythonplayground Python Playground | No Starch Press :"Python Playground is a collection of fun programming projects that will level up your Python skills." GUI Programming PyQt |wiki.python.org://PyQt> :"PyQt is one of the most popular Python bindings for the Qt cross-platform C++ framework. PyQt developed by Riverbank Computing Limited." :PyQt is a Python binding of the cross-platform GUI toolkit Qt, implemented as a Python plug-in. PyQt is free software developed by the British firm Riverbank Computing." :"PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt is a blend of Python programming language and the Qt library. This introductory tutorial will assist you in creating graphical applications with the help of PyQt." Also possible for J (Programming Language) with Qt IDE. Game programming with Qt: : : ---- }} Category:Code Category:Coding Languages Category:Scripts Category:Python